#include "Calculator.h"
#define test 10
// Driver's code
int main()
{
	string exp;
	try {
		for (int i = 0; i < test; i++) {
            std::cout<<"您输入的表达式是：";
			getline(cin, exp);
            std::cout<<exp<<std::endl;
			vector<string> result;
			double output;
			result = infixToPostfix(exp);
			output = evaluate(result);
			std::cout << "计算的结果是"<<output << std::endl<<std::endl;
		}
		// vector<string> result;
		// double output;
		// result = infixToPostfix(exp);
		// output = evaluate(result);
		// cout << "计算的结果是"<<output << endl;
	}
	catch (const char* s) {
		std::cerr << s << endl;
	}
	
	return 0;
}
